{% with messages = get_flashed_messages() %}
{% if messages %}
  {% for message in messages %}
    <div class="container">
      <div class="alert alert-warning alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        {{ message }}
      </div>
    </div>
  {% endfor %}
{% endif %}
{% endwith %}